{{if (sizeof($this->categories) > 0 || $this->user->uid == $this->authorId) :}}
<div class="joe_detail__category">
    {{if (sizeof($this->categories) > 0) :}}
    {{foreach (array_slice($this->categories, 0, 5) as $key => $item) :}}
    <a href="{{echo $item['permalink']}}" class="item item-{{echo $key}}" title="{{echo $item['name']}}">{{echo $item['name']}}</a>
    {{endforeach}}
    {{endif}}
    {{if ($this->user->uid == $this->authorId) :}}
    {{if ($this->is('post')) :}}
    <a class="edit" target="_blank" rel="noopener noreferrer" href="{{$this->options->adminUrl()}}write-post.php?cid={{echo $this->cid}}">编辑文章</a>
    {{else :}}
    <a class="edit" target="_blank" rel="noopener noreferrer" href="{{$this->options->adminUrl()}}write-page.php?cid={{echo $this->cid}}">编辑页面</a>
    {{endif}}
    {{endif}}
</div>
{{endif}}

<h1 class="joe_detail__title">{{$this->title()}}</h1>
<div class="joe_detail__count">
    <div class="joe_detail__count-information">
        <img width="35" height="35" class="avatar lazyload" src="{{_getAvatarLazyload()}}" data-src="{{_getAvatarByMail($this->author->mail)}}" alt="{{$this->author()}}" />
        <div class="meta">
            <div class="author">
                <a class="link" href="{{$this->author->permalink()}}" title="{{$this->author()}}">{{$this->author()}}</a>
            </div>
            <div class="item">
                <span class="text">{{$this->date('Y-m-d')}}</span>
                <span class="line">/</span>
                <span class="text">{{$this->commentsNum('%d')}} 评论</span>
                <span class="line">/</span>
                <span class="text" id="Joe_Article_Views">{{_getViews($this)}} 阅读</span>
                <span class="line">/</span>
                <span class="text" id="Joe_Baidu_Record">正在检测是否收录...</span>
            </div>
        </div>
    </div>
    <time class="joe_detail__count-created" datetime="{{$this->date('m/d')}}">{{$this->date('m/d')}}</time>
</div>